<%@ page language="java" import="java.util.*,entity.*,service.impl.*,service.* "  pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%  

String path = request.getContextPath();  

String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";  

%>   
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>search页面</title>
		<!--
        	作者：1107485571@qq.com
        	时间：2018-07-10
        	描述：引用bootstrap样式和js
        	版本说明：bootstrap 3.3.7   jquery3.3.1
        -->
		<link rel="stylesheet" type="text/css" href="css/bootstrap.css"/>
		<script src="js/jquery-3.3.1.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
		
		<!--
        	作者：1107485571@qq.com
        	时间：2018-07-07
        	描述：引用额外的图标库
        -->
        <link rel="stylesheet" href="css/iconfont.css" />
        
        <!--
        	作者：1107485571@qq.com
        	时间：2018-07-07
        	描述：主页的css样式
        -->
        <link rel="stylesheet" type="text/css" href="css/contest_detail.css	"/>
		
	</head>
	<body>
		<%@ include file="header.jsp" %>
		
		<!-- 获得以关键字查询的结果list -->
		<% 
			Contest contest = new ContestDAOImpl().queryContestByName( request.getParameter("contestName") );	//按名字查询
			session.setAttribute("contest", contest);
			System.out.println("我按名字搜到:"+contest.getContestName()+" 比赛");
			
			SponsorDAOImpl sponsor = new SponsorDAOImpl();
			session.setAttribute("sponsor", sponsor);

		 %>
		<div class="container" id="mid_detail">
			<div class="row clearfix">
				<div class="col-md-12 column">
					<div class="row clearfix">
						<div class="col-md-12 column">
							<img style="width:100%;height:300px;margin-top: 20px;" alt="140x140" src="${ contest.contestImgUrl }" />
						</div>
					</div>
					<div class="row clearfix">
						<div class="col-md-12 column">
							<div class="row clearfix">
								<div class="col-md-8 column">
									<div class="col-md-12 column" id="tab_mid_ul1">
										<ul class="nav nav-tabs">
											<li>
												 <a href="#">竞赛信息</a>
											</li>
											<li>
												 <a href="#">通知公告(0)</a>
											</li>
											<li>
												 <a href="#">讨论区(0)</a>
											</li>
										</ul>
									</div>
								</div>
								<div class="col-md-4 column">
									<div class="row clearfix">
										<div class="col-md-12 column" id="detail_right">
											<div id="lijibaoming">
												<span><a>立即报名</a></span>
											</div>
										</div>
									</div>
								</div>
							</div>
							<div class="row clearfix">
								<div class="col-md-12 column">
									<div class="row clearfix">
										<div class="col-md-9 column">
											<div class="row clearfix">
												<div class="col-md-12 column">
													<div id="detail_content">
														<h3>${ contest.contestName }</h3>
														<div id="detail_info">
															<h4>竞赛信息</h4>
															${ contest.contestDetail }
														</div>
														<div id="detail_tongzhi">
															<h4>通知公告(0)</h4>
														</div>
														<div id="detail_pinglun">
															<h4>评论(0)</h4>
															<div id="pinglun_content">
																<textarea></textarea>
																<div><button>发表评论</button></div>
															</div>
														</div>
													</div>
												</div>
											</div>
										</div>
										<div class="col-md-3 column">
											<div class="row clearfix">
												<div class="col-md-12 column">
													<ul class="list-unstyled" id="ppppp">
														<li>
															<span class="contest_new_title">
																<span class="ppppp1">主办方</span>
																<span class="small_content">
																	<c:set var="sponsor1"
																		value="${sponsor.queryBySponsor_id(contest.sponsorId)}"
																		scope="session" />
																	${ sponsor1.sponsorName }
																</span>
															</span>
														</li>
														<li>
															<span class="contest_new_title">
																<span class="ppppp1">热度</span>
																<span class="small_content">${ contest.hotDegree }</span>
															</span>
														</li>
														<li>
															<span class="contest_new_title">
																<span class="ppppp1">报名时间</span>
																<span class="small_content">
																	${ contest.signupStartTime } ~  ${ contest.signupEndTime }
																</span>
															</span>
														</li>
														<li>
															<span class="contest_new_title">
																<span class="ppppp1">类型</span>
																<span class="small_content">比赛类型</span>
															</span>
														</li>
														<li>
															<span class="contest_new_title">
																<span class="ppppp1">级别</span>
																<span class="small_content">国家级</span>
															</span>
														</li>
														<li>
															<span class="contest_new_title">
																<span class="ppppp1">报名费</span>
																<span class="small_content">免费级</span>
															</span>
														</li>
														<li>
															<span class="contest_new_title">
																<span class="ppppp1">关注竞赛</span>
																<span class="small_content">敬请关注</span>
															</span>
														</li>
													</ul>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	
		<%@ include file="bottom.jsp" %>
	</body>
</html>
